package com.zhudi.develop_demo_as.adapter;


import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.zhudi.develop_demo_as.R;
import com.zhudi.develop_demo_as.entity.ModelTest;

import java.util.List;

public class OrderTypeAdapter extends BaseListViewAdapter{
    private LayoutInflater mInflater;
    private List<ModelTest> listData;

    public OrderTypeAdapter(Context context) {
        super(context);
        listData = (List<ModelTest>)mData;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
         if (convertView == null) {
             mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
             holder = new ViewHolder();
             convertView = mInflater.inflate(R.layout.listitem_order, null);
             holder.tvTitle = (TextView) convertView.findViewById(R.id.tv);
             convertView.setTag(holder);
         } else {
             holder = (ViewHolder) convertView.getTag();
         }

        //holder.tvTitle.setText(listData.get(position).getNickname());

        return convertView;
    }

    private class ViewHolder {
        TextView tvTitle, tvMore;
        ImageView ivPic;
    }

}
